package com.situ.mall.api.user;

import com.situ.mall.common.util.Result;
import com.situ.mall.pojo.entity.product.Product;
import com.situ.mall.pojo.entity.user.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

@FeignClient(value = "user-service")
public interface UserClient {

    @GetMapping("/user/selectById/{id}")
    Result<User> selectById(@PathVariable Long id);

    @PutMapping("/user/updateBalance")
    Result updateBalance(@RequestParam("userId") Long userId,@RequestParam("balance") BigDecimal balance);
}
